package com.zksk.mbg.admin.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zksk.common.core.web.domain.BaseEntity;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 违规资讯信息表
 * </p>
 *
 * @author Zksk Acmen
 * @since 2022-12-27
 */
@Data
@Accessors(chain = true)
@TableName("platform_fact_violate")
@ApiModel(value = "Violate对象", description = "违规资讯信息表")
public class Violate extends BaseEntity {

    @ApiModelProperty("主键id")
    @TableField("id")
    @NotNull(message = "主键id不能为空!", groups = Update.class)
    private Long id;

    @ApiModelProperty("标题名称")
    @TableField("title_name")
    @NotNull(message = "标题名称不能为空!", groups = {Insert.class, Update.class})
    private String titleName;

    @ApiModelProperty("违规名称")
    @TableField("violate_name")
    @NotNull(message = "违规名称不能为空!", groups = {Insert.class, Update.class})
    private String violateName;

    @ApiModelProperty("违规类型（备用字段）")
    @NotNull(message = "违规类型不能为空!", groups = {Insert.class, Update.class})
    @TableField("violate_type")
    private Integer violateType;

    @ApiModelProperty("违规状态（备用字段）")
    @TableField("`status`")
    private Integer status;

    @ApiModelProperty("违规时间")
    @TableField("violate_time")
    private LocalDateTime violateTime;

    @ApiModelProperty("描述")
    @TableField("`desc`")
    private String desc;

    @ApiModelProperty("通告部门")
    @TableField("notice_dept")
    @NotNull(message = "通告部门不能为空!", groups = {Insert.class, Update.class})
    private String noticeDept;

    @ApiModelProperty("处罚依据")
    @TableField("punish_basis")
    @NotNull(message = "处罚依据不能为空!", groups = {Insert.class, Update.class})
    private String punishBasis;

    @ApiModelProperty("处罚结果")
    @TableField("punish_result")
    @NotNull(message = "处罚结果不能为空!", groups = {Insert.class, Update.class})
    private String punishResult;

    @ApiModelProperty("附件地址")
    @TableField("`file`")
    private String file;

    @ApiModelProperty("信息时间")
    @TableField("info_time")
    private LocalDateTime infoTime;

    @ApiModelProperty("违规对象")
    @TableField("violate_obj")
    private String violateObj;

    @ApiModelProperty("查看次数")
    @TableField("look_num")
    private Integer lookNum;

    @ApiModelProperty("删除标识（0 正常 2删除）")
    @TableField(value = "del_flag", fill = FieldFill.INSERT)
    @TableLogic
    private Integer delFlag;


    public static final String ID = "id";

    public static final String TITLE_NAME = "title_name";

    public static final String VIOLATE_NAME = "violate_name";

    public static final String VIOLATE_TYPE = "violate_type";

    public static final String STATUS = "status";

    public static final String VIOLATE_TIME = "violate_time";

    public static final String DESC = "desc";

    public static final String NOTICE_DEPT = "notice_dept";

    public static final String PUNISH_BASIS = "punish_basis";

    public static final String PUNISH_RESULT = "punish_result";

    public static final String FILE = "file";

    public static final String INFO_TIME = "info_time";

    public static final String VIOLATE_OBJ = "violate_obj";

    public static final String LOOK_NUM = "look_num";

    public static final String DEL_FLAG = "del_flag";

    @Override
    public Serializable pkVal() {
        return null;
    }

}
